#ifndef PTR_XY_H_
#define PTR_XY_H_

#include "ptr.h"
#include "rectype.h"
#include "stdffield.h"
#include <vector>
#include <string>
#include <map>

namespace opsrc {
    namespace stdf {

        class PtrXY : public opsrc::stdf::Ptr
        {
        public:
            PtrXY(stdf_rec stdfrec,  int reclen, std::ios::pos_type fileRecFirstBytePosition, int orderindex, endian e, char* buf);
            virtual ~PtrXY();

            const StdfField<int> getXCoordinate() const;
            void setXCoordinate(StdfField<int> xcoord);

            const StdfField<int> getYCoordinate() const;
            void setYCoordinate(StdfField<int> ycoord);

            const int getSeqId();
            void setSeqId(int seqid);

        protected:
            PtrXY();

        private:
            StdfField<int> x_coord;
            StdfField<int> y_coord;

            int seq_id;
            bool count_increased;
            static map<string,int> seq_count;

            endian en;
        };
    }
}
#endif /*PTR_H_*/
